@import './maxin.scss';

html,
body,
#q-app {
  width: 100%;
  height: 100vh;
  color: #333333;
  overflow: hidden;
  box-sizing: border-box;
  scroll-behavior: smooth;
  @include none-select();
}

html, body, #q-app, code, kbd, pre, samp, code[class*="language-"], pre[class*="language-"] {
  font-family: Arial, 微软雅黑, MicrosoftYaHei, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, sans-serif;
}

.body--light {
  .qx-page, .layout-page, .q-modal-card, .dialog-layout {
    background-size: cover;
    background-image: url("src/assets/PAGE.svg");
  }
}

[id^="q-portal--menu--"] {
  height: 100% !important;
}

.q-field--readonly .q-field__inner {
  background-color: rgba($grey-3, .4);
}

.text-selectable {
  @include text-select();
}

.overflow-hidden-x {
  overflow-x: hidden !important;
}

.overflow-auto-x {
  overflow-x: auto !important;
}

.overflow-auto-y {
  overflow-y: auto !important;
}

.transparent-border {
  border-color: transparent !important;
}

.non-border-bottom {
  border-bottom-color: transparent !important;
}

.custom-switch, .custom-switch--absolute {
  width: 3rem;

  .q-toggle__inner {
    width: 3rem;
    height: 1.65rem;
    min-width: 3rem;
    padding: .24rem 0;
    font-size: 3.3rem !important;
  }

  .q-toggle__track {
    height: 1.05rem;
    border-radius: $button-border-radius;
  }

  .q-toggle__thumb {
    top: 0;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
  }

  &:not(.disabled):focus .q-toggle__thumb:before,
  &:not(.disabled):hover .q-toggle__thumb:before {
    transform: scale3d(1.5, 1.5, 1) !important;
  }

  .q-toggle__thumb:before,
  .q-toggle__thumb:after {
    border-radius: $button-border-radius !important;
  }

  .q-toggle__inner--truthy .q-toggle__thumb {
    left: 1.5rem;
  }

  .q-toggle__inner--indet .q-toggle__thumb {
    left: 0.75rem;
  }
}

.custom-switch {
  position: relative;
  top: 0.05rem;
}

.custom-switch--absolute {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.aspect-ratio-1 {
  aspect-ratio: 1/1;
}

.clip-chip-tri {
  clip-path: polygon(100% 0, 0 0, 100% 100%);

  .q-chip__content {
    position: relative;
    top: -.2rem;
    right: -.25rem;
  }
}

.col-full-width {
  width: 100%;
}

.q-col-125rem {
  width: 12.5rem;
}

.max-height-inherit {
  max-height: inherit !important;
}

.bg-conic-gradient {
  width: 100%;
  height: 100%;
  backdrop-filter: invert(2%) blur(6.25rem);
  -webkit-backdrop-filter: invert(2%) blur(6.25rem);
  mask-image: repeating-conic-gradient(from 0deg, #FFF 5deg, transparent 10deg);
  -webkit-mask-image: unquote("repeating-conic-gradient(from 0deg, #FFF 5deg, transparent 20deg)");
}

.border-8 {
  border-radius: $button-border-radius * 2 !important;
}

.bg-white-6 {
  background-color: rgba(#FFF, .6);
}

.bg-even {
  background-color: #F3F7FD;
}

.line-height-1 {
  line-height: 1;
}

.handle-move {
  cursor: move;
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

.gradient-separator-x {
  background: linear-gradient(90deg, rgba(216, 216, 216, 0) 0%, var(--q-primary) 50%, rgba(216, 216, 216, 0) 100%);
}

.gradient-separator-y {
  background: linear-gradient(0, rgba(216, 216, 216, 0) 0%, var(--q-primary) 50%, rgba(216, 216, 216, 0) 100%);
}

.text-initial {
  text-transform: initial;
}

.warning-tips {
  padding: .25rem .5rem;
  border-radius: .5rem;
  background: #FFFBE6;
  white-space: pre-line;
  border: .0625rem solid #FFF1B8;
}

.q-form--title-tips {
  font-weight: bold;
  color: var(--q-primary);
  background-color: $grey-3;
  padding: $space-base * .5 $space-base;
  border-radius: $generic-border-radius;
}

.cursor-hover:hover {
  opacity: .75;
}

.cursor-hover-image:hover {
  transform: scale(1.08);
  transition: transform .35s ease;
  filter: drop-shadow(0 0 .8rem rgba(255, 215, 0, .5));
}

.cursor-primary-hover:hover {
  opacity: .75;
  color: var(--q-primary);
}

.q-link--disable {
  opacity: .5;
}

.q-dialog-confirm .q-card__actions {
  padding: .5rem 1rem .625rem;
}

img {
  @include none-select();
}

th > div {
  @include text-select();
}

td {
  overflow: hidden;
  @include text-select();
}

.q-td > .q-field {
  width: inherit;
}

.q-charts {
  width: 100%;
  height: 100%;
}

.q-btn.disabled, .q-checkbox.disabled {
  opacity: .4 !important;
}

.ellipsis, .ellipsis-2-lines, .ellipsis-3-lines {
  white-space: pre-wrap;
  word-break: break-all;
}

.multiRow_2 {
  display: -webkit-box;
  /*值必须为-webkit-box或者-webkit-inline-box*/
  -webkit-box-orient: vertical;
  /*值必须为vertical*/
  -webkit-line-clamp: 2;
  /*值为数字，表示一共显示几行*/
  overflow: hidden;
  word-break: break-all;
  /*允许在单词内换行, 否则 纯字母不会出现...*/
  text-overflow: ellipsis;
}

.non-json code {
  white-space: pre-line !important;
  word-wrap: break-word !important;
}

kbd {
  color: #616161;
  white-space: nowrap;
  display: inline-block;
  padding: $space-base * 0.3 $space-base * 0.5 $space-base * 0.5;
  margin: $space-base * 0.25 $space-base * 0.25 0 0;
  border-radius: $space-base * 0.25;
  background: linear-gradient(180deg, #d5dbe4, #f8f8f8);
  box-shadow: inset 0 -2px #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px #1e235a66;
}